import { lazy } from 'react'
const PickFolder = lazy(()=>import('#cpt/form-element/pick-folder'))
/* -------------------------------------------------------- 上传 json 数据 -- */
const Index = ({ database }) => {
	return {
		modal:{
			title: '导入 SQL 数据',
			width 	: '35%',
		},
		form: {
			labelWidth: 's5',
			api: 'mysql/import_table_sql',
			infoApi : false,
			param: { database  },
			data: [
				{ label: '数据库', name:'database', disabled:1 },
				// { label: '密码', name:'pwd', type:'password', r:1 },
				{ label: 'SQL 文件',  name: 'path', slot: v => <PickFolder {...v} file/>, r:1}
			]
		}
	}
}
export default Index